var GT_Geolocation = {
    init : function (map) {
        var self = this;
        if(navigator.geolocation) { //El navegador soporta geolocalizacion
            navigator.geolocation.getCurrentPosition(
                function(position) {
                    map.setCenter(new google.maps.LatLng(position.coords.latitude,position.coords.longitude));
                },
                function() {
                //nada
                }
                );
        } else if (google.gears) { //Si no, usamos la geolocaizacion de google
            var geo = google.gears.factory.create('beta.geolocation');
            geo.getCurrentPosition(
                function(position) {
                    map.setCenter(new google.maps.LatLng(position.latitude,position.longitude));
                },
                function() {
                //nada
                }
                );
        }
    },
    isMobile: function () {
        return (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent));
    },
    localize: function (map) {
        if (this.isMobile()) {
            this.init(map);
        }
    }
}